package com.magold.sprite;

import org.andengine.entity.shape.IAreaShape;
import org.andengine.entity.shape.IShape;
import org.andengine.input.touch.TouchEvent;
import org.andengine.opengl.shader.ShaderProgram;
import org.andengine.opengl.vbo.IVertexBufferObject;
import org.andengine.opengl.vbo.VertexBufferObjectManager;

public class AreaShapeFilter extends EntityFilter implements IAreaShape {
	protected IAreaShape mWrappedShape;
	
	public AreaShapeFilter(IAreaShape pShape) {
		mWrappedShape = pShape;
	}
	
	@Override
	public IAreaShape getWrappedEntity() {
		return mWrappedShape;
	}

	@Override
	public float getWidth() {
		return mWrappedShape.getWidth();
	}

	@Override
	public boolean contains(float pX, float pY) {
		return mWrappedShape.contains(pX, pY);
	}

	@Override
	public float getHeight() {
		return mWrappedShape.getHeight();
	}

	@Override
	public float getWidthScaled() {
		return mWrappedShape.getWidthScaled();
	}

	@Override
	public float getHeightScaled() {
		return mWrappedShape.getHeightScaled();
	}

	@Override
	public void setHeight(float pHeight) {
		mWrappedShape.setHeight(pHeight);
	}

	@Override
	public void setWidth(float pWidth) {
		mWrappedShape.setWidth(pWidth);
	}

	@Override
	public void setSize(float pWidth, float pHeight) {
		mWrappedShape.setSize(pWidth, pHeight);
	}

	@Override
	public boolean onAreaTouched(TouchEvent pSceneTouchEvent,
			float pTouchAreaLocalX, float pTouchAreaLocalY) {
		return mWrappedShape.onAreaTouched(pSceneTouchEvent, pTouchAreaLocalX,
				pTouchAreaLocalY);
	}

	@Override
	public boolean collidesWith(IShape pOtherShape) {
		return mWrappedShape.collidesWith(pOtherShape);
	}

	@Override
	public boolean isBlendingEnabled() {
		return mWrappedShape.isBlendingEnabled();
	}

	@Override
	public void setBlendingEnabled(boolean pBlendingEnabled) {
		mWrappedShape.setBlendingEnabled(pBlendingEnabled);
	}

	@Override
	public int getBlendFunctionSource() {
		return mWrappedShape.getBlendFunctionSource();
	}

	@Override
	public int getBlendFunctionDestination() {
		return mWrappedShape.getBlendFunctionDestination();
	}

	@Override
	public void setBlendFunctionSource(int pBlendFunctionSource) {
		mWrappedShape.setBlendFunctionSource(pBlendFunctionSource);
	}

	@Override
	public void setBlendFunctionDestination(int pBlendFunctionDestination) {
		mWrappedShape.setBlendFunctionDestination(pBlendFunctionDestination);
	}

	@Override
	public void setBlendFunction(int pBlendFunctionSource,
			int pBlendFunctionDestination) {
		mWrappedShape.setBlendFunction(pBlendFunctionSource,
				pBlendFunctionDestination);
	}
	@Override
	public VertexBufferObjectManager getVertexBufferObjectManager() {
		return mWrappedShape.getVertexBufferObjectManager();
	}

	@Override
	public IVertexBufferObject getVertexBufferObject() {
		return mWrappedShape.getVertexBufferObject();
	}

	@Override
	public ShaderProgram getShaderProgram() {
		return mWrappedShape.getShaderProgram();
	}

	@Override
	public void setShaderProgram(ShaderProgram pShaderProgram) {
		mWrappedShape.setShaderProgram(pShaderProgram);
	}

}
